/**
 * @file	IODataTypes.h
 * @author  Thomas Fu <thomas.ks.fu@gmail.com>
 * @version 0.0.1
 * @date	03/26/2011	
 *
 * @section License
 * This program is propety of The SOSS and may not be used by any 
 * individual for any purpose at any time without express permission from 
 * Mike Casey, Thomas Fu, Chris Hairfield, Kyle Lamson, Ben Treweek, or Cliff 
 * Warren.
 *
 * @brief 
 * This file contains definitions of structs used to pass information to 
 * callback functions used in processing the audio input and output
 */

#ifndef _iodatatypes_h
#define _iodatatypes_h

#include "TubeScreamer.h"
#include "Effect.h"

/**
 * Struct used to pass information into the general IO callback function
 * (subject to change if more information is needed)
 */
typedef struct {
	
	/** The number of total bytes in each of the input and output buffers */
	unsigned int *bytes;
	
	/** The sampling frequency (in Hertz) of the input and output buffers */
	unsigned int fs;
	
	/** The effect to be used to generate the output data from the input data */
	Effect *effect;

	FILE *fd;
} ioData;

/** 
 * Struct used to pass information into the particular function used to process 
 * the input buffer and produce the output buffer (subject to change if more 
 * information is needed)
 */
typedef struct{
	
	/** The number of total bytes in each of the input and output buffers */
	unsigned int *bytes;
	
	/**
	 * More accurate (or at least consistent) way of keeping track of the time at
	 * the start of the buffer than streamTime
	 */
	unsigned int bufferStartTime;
	
	/** The number of frames (data samples) in the input and output buffers */
	unsigned int nBufferFrames;

} processData;


#endif